package com.etc.dao;

import com.etc.entity.Goods;
import com.etc.entity.Shopc;
import com.etc.util.PageData;

/**
 * 购物车的dao接口
 * 
 * @author
 *
 */
public interface ShopCartDao {
	/**
	 * 分页查询用户购物车及模糊查询
	 * 
	 * @param keywords
	 * @return
	 */
	public PageData<Shopc> selShopCar(int userid, int page, int pageSize, String keywords);

	/**
	 * 添加商品至购物车
	 * 
	 * @param shopc
	 * @return
	 */
	public boolean addShopCar(Shopc shopc);

	/**
	 * 将商品从购物车删除
	 * 
	 * @param goodsname
	 * @return
	 */
	public boolean delShopCar(int userid, String goodsname);

	public Goods selShopName(Goods goods, String goodsname);
	
	
	
	/**
	
	* <p>Title: getShopcByUserIdAndGoodsId</p>
	
	* <p>Description: </p>
	
	* @param userid
	* @param goodsid
	* @param shopid
	* @return
	
	*/
	public Shopc getShopcByUserIdAndGoodsId(int userid, int goodsid,int shopid);
	
	/**
	
	* <p>Title: updateShopcByshopcid</p>
	
	* <p>Description: </p>
	
	* @param shopc
	* @return
	
	*/
	public boolean updateShopcByshopcid(Shopc shopc);
	
}
